package com.example.demo.demos.example;

import java.util.*;

/**
 * @author lyh
 * @date 2025/4/30 13:56
 */
public class ListRemoveAll {
    public static void main(String[] args) {
        List<String> listA = new ArrayList<>(Arrays.asList("c"));
        List<String> listB = Arrays.asList("a", "c");
        listB.removeAll(listA); // 直接调用removeAll
        System.out.println(listB); // 输出 [b]
    }
}
